// Fill out your copyright notice in the Description page of Project Settings.


#include "STCustomObjectData.h"


bool USTCustomObjectData::AddOneParam(FString name, int value)
{
	// We should never hit this!  stubs to avoid NoExport on the class.
	check(0);
	return false;
}

DEFINE_FUNCTION(USTCustomObjectData::execAddOneParam)
{

	P_GET_PROPERTY(FStrProperty, name);

	Stack.MostRecentPropertyAddress = nullptr;
	Stack.StepCompiledIn<FProperty>(nullptr);
	FProperty* TargetProperty = Stack.MostRecentProperty;
	void* TargetValuePtr = Stack.MostRecentPropertyAddress;

	P_FINISH;

	bool bSuccess = false;
	FString ValueStr;
	if (TargetProperty) {
		TargetProperty->ExportTextItem_InContainer(ValueStr, TargetValuePtr, nullptr, nullptr, PPF_None);
		GLog->Log(name + "===" + ValueStr);
		bSuccess = true;
	}



	*(bool*)RESULT_PARAM = bSuccess;
}

USTCustomObjectData* USTCustomObjectData::MakeOneParamData() 
{
	return NewObject<USTCustomObjectData>();
}


void USTCustomObjectData::TestCustomFunction() 
{
	GLog->Log("USTCustomObjectData::TestCustomFunction() ");

	

}